package com.yezao.yzrouter

import android.content.Context
import com.yezao.yzrouter.schemaparser.AbsSchemaParser

interface IRouter {
    fun init(context: Context)
    fun registSchemaParsers(vararg parser: AbsSchemaParser)

    fun registRoutes(collection: Map<String,String>)


    fun unregistRoutes(collection: Map<String,Class<*>>)

    fun loadFromJson(context: Context,jsonRes:Int)

    fun loadFromXml(context: Context,xmlRes:Int)

    fun findSchemaParser(url: String): AbsSchemaParser?


    /**
     * @param route 路由 schema 可能包含了参数
     * */
    fun goTo(from:Context,route:String)

}